{php}
$last=$pageInfo['beginPage']-((int)($pageInfo['PageHtmlLen'])/2)-1;
$next=$pageInfo['endPage']+((int)($pageInfo['PageHtmlLen'])/2)+1;
{/php}

<div class="pageNav">
	<li><a ref="nofollow" title="第一页" href="{e:$pageInfo['mainUrl'].'1'.$pageInfo['ext']}">第1页</a></li>
	
	{if $last>0}
	<li><a ref="nofollow" title="上{e:$pageInfo['PageHtmlLen']}页" href="{e:$pageInfo['mainUrl'].$last.$pageInfo['ext']}">&lt;</a></li>
	{/if}
		
	{for $i=$pageInfo['beginPage'];$i<=$pageInfo['endPage'];$i++}
		{if $i>$pageInfo['totalPage']}
		{else}
			{if $i==$pageInfo['currentPage']}
				<li><span  class='navSelected'><em>{e:$pageInfo['currentPage']}</em></span></li>
			{else}
				<li><a ref="nofollow" href="{e:$pageInfo['mainUrl'].$i.$pageInfo['ext']}">{e:$i}</a></li>  
			{/if}
		{/if}
	{/for}
		
	{if $next<$pageInfo['totalPage']}
	<li><a ref="nofollow" title="下{e:$pageInfo['PageHtmlLen']}页" href="{e:$pageInfo['mainUrl'].$next.$pageInfo['ext']}">&gt</a></li>
	{/if}
	
	{if $pageInfo['totalPage']>$pageInfo['PageHtmlLen']}
	<li><a ref="nofollow" title="末页" href="{e:$pageInfo['mainUrl'].$pageInfo['totalPage'].$pageInfo['ext']}">末页</a></li>
	{/if}

</div>
